load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
]

MACRO_DEPENDENCIES = [
]

DEV_DEPENDENCIES = [
]

MACRO_DEV_DEPENDENCIES = [
]

LIB_SRCS = glob(
    ["src/**/*.rs"],
    # Ensures that we do not need to rebuild just because a _test.rs file
    # changed.
    exclude = ["**/*tests.rs"],
)

rust_library(
    name = "string",
    srcs = LIB_SRCS,
    crate_name = "ic_nervous_system_string",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.0.1",
    deps = DEPENDENCIES,
)

rust_test(
    name = "string_test",
    srcs = glob(["src/**/*.rs"]),
    proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
    deps = DEPENDENCIES + DEV_DEPENDENCIES,
)
